interface Animal {
  name: string;
  age: number;
  readonly type: string;
  readonly gender: string;
}

let dog: Animal = {
  name: 'Puppy',
  age: 5,
  type: 'Alaskan Malamute',
  gender: 'femail'
}

dog.age = 6;
// dog.type = 'Akita dog'; // 不可赋值

let constArr: ReadonlyArray<number> = [1, 2, 3, 4];
console.log(constArr[3]);
// constArr.push(10); // 不存在push方法